package cn.aib.eduservice.service;

import cn.aib.commonutils.R;
import cn.aib.eduservice.entity.EduCourse;
import cn.aib.eduservice.entity.frontVo.CourseQueryVo;
import cn.aib.eduservice.entity.vo.CourseInfoVo;
import cn.aib.eduservice.entity.vo.CoursePublishVo;
import cn.aib.eduservice.entity.vo.CourseWebVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author testjava
 * @since 2020-12-21
 */
public interface EduCourseService extends IService<EduCourse> {

    //保存课程
    String addCourse(CourseInfoVo course);

    CourseInfoVo getCourseInfoById(String courseId);

    void updateCourseInfo(CourseInfoVo courseInfoVo);

    CoursePublishVo getPublishCourse(String courseId);

    R deleteCourse(String courseId);

    List<EduCourse> selectCourselist(QueryWrapper<EduCourse> courseWrapper);

    Map<String, Object> selectFrontCoursePagelist(long current, long limit, CourseQueryVo courseQueryVo);

    CourseWebVo getFrontCourseInfo(String id);
}
